<!--{if $page_info.page_count gt 1}-->
<div class="page">
    <input type="button" class="btn-page-1" onclick="{if !$smarty.get.page || $smarty.get.page == 1}alert('已经是第一页了'){else}location.href='{$page_info.first_link}'{/if}" />
    <input type="button"  class="btn-page-3" onclick="{if $page_info.prev_link}location.href='{$page_info.prev_link}'{else}alert('已经是第一页了'){/if}" />
    <span><!--{foreach from=$page_info.page_links item=link key=page}--><!--{if $page_info.curr_page eq $page}-->{$page}<!--{else}--><a href="{$link}">{$page}</a><!--{/if}--><!--{/foreach}--></span>
    <input type="button"  class="btn-page-4" onclick="{if $page_info.next_link}location.href='{$page_info.next_link}'{else}alert('已经是最后一页了'){/if}"/>
    <input type="button" class="btn-page-2" onclick="{if $smarty.get.page == $page_info.page_count}alert('已经是最后一页了'){else}location.href='{$page_info.last_link}'{/if}" />
	<span>共&nbsp;{$page_info.page_count}&nbsp;页</span>
    <span>{$lang.page_to}
    <input id="topage" type="text" class="input-4" value="{$smarty.get.page}"/>
    {$lang.page}
    <input type="button" class="btn-page-5" onclick="gotopage(document.getElementById('topage').value);" />
    </span> <span>{$lang.show_on_a_page}
    <select id="size" onchange="pagesize(this.value);">
      <option value="10" {if $page_info.pageper == 10}selected{/if}>10</option>
      <option value="20" {if $page_info.pageper == 20}selected{/if}>20</option>
      <option value="30" {if $page_info.pageper == 30}selected{/if}>30</option>
      <option value="40" {if $page_info.pageper == 40}selected{/if}>40</option>
      <option value="50" {if $page_info.pageper == 50}selected{/if}>50</option>
    </select>
    {$lang.record_number}</span> </div>
<!--{/if}-->
<script language="javascript" type="text/javascript">
function gotopage(page) {
	var url = location.href;
	var index = url.indexOf('page=');
	if (index == -1) {
		url += '&page=' + page;
	} else {
		url = url.replace(url.substring(index), '') + 'page=' + page;
	}
	location.href = url;
}
function pagesize(size) {
	var url = location.href;
	var index = url.indexOf('size=');
	if (index == -1) {
		url += '&size=' + size;
	} else {
		url = url.replace(url.substring(index), '') + 'size=' + size;
	}
	location.href = url;
}
</script>